function getList1(){
    axios.get('http://124.223.14.236:8060/index/list?page=1&limit=10&cateid=9').then((res)=>{
        console.log(res)

        let newList1 = res.data.data.list.data.map((item)=>{
            return`
            <article class="excerpt excerpt-one">
            <header>
              <h2>
                <a target="_blank" href="show.html" title="阿里云拼团推荐服务器">${item.title}</a>
              </h2>
            </header>
            <p class="text-muted time">
              <a href="">${item.author}</a> 发布于 2018-03-30
            </p>
            <p class="focus">
              <a target="_blank" href="http://blog.weknow.cn/474.shtml" class="thumbnail">
                <span class="item"><span class="thumb-span"><img src="http://124.223.14.236:8060/${item.pic}"
                      class="thumb" /></span></span></a>
            </p>
            <p class="note"></p>
            <p class="text-muted views">
              <span class="post-views">阅读(${item.click})</span>
              <span class="post-comments">评论(${item.istop})</span>
              <a href="javascript:;" class="post-like">
                <i class="fa fa-thumbs-up"></i>赞 (<span>${item.ishot}</span>)
              </a>
              <span class="post-tags">标签：${item.tags}
                
            </p>
          </article> 
            `
        })
        $('.excerpt.excerpt-one').html(newList1.join(''))
    })
}
getList1()

function getAll1(){
    axios.get('http://124.223.14.236:8060/index/index').then((res)=>{
        // console.log(res)

        let newArr = res.data.data.sideBanner.map((item)=>{
            return`
            <a href="${item.advimglink}" rel="nofollow" target="_blank" title="${item.advimgdesc}">
            <img class="g430" style="width:360px;height:133px;" src="http://124.223.14.236:8060/${item.advimgsrc}" alt="" >
          </a>
            `
        })
        $('.textwidget').html(newArr.join(''))
    })
}
getAll1()

function getTitle1(){
    axios.get('http://124.223.14.236:8060/index/recommend').then((res)=>{
        // console.log(res)

        let newTitle = res.data.data.list.map((item)=>{
            return`
            <li>
              <a target="_blank" href="">
                <span class="thumbnail">
                  <img src="http://124.223.14.236:8060/${item.pic}" class="thumb" />
                </span>
                <span class="text">${item.title}</span>
                <span class="text-muted post-views">阅读(${item.click})</span>
              </a>
            </li>
            `
        })
        $('.items-02').html(newTitle.join(''))
    })
}
getTitle1()

function getTag1(){
    axios.get('http://124.223.14.236:8060/index/index').then((res)=>{
        console.log(res)

        let newTag = res.data.data.allTag.map((item)=>{
            return`
            <li><a title="" href="">${item.tagname}</a></li>
            `
        })
        $('.widget_tags_inner').html(newTag.join(''))
    })
}
getTag1()

function getAllLink1(){
    axios.get('http://124.223.14.236:8060/index/index').then((res)=>{
        console.log(res)

        let newAllLink = res.data.data.allLink.map((item)=>{
            return`
           
            <li>
            <a href="${item.url}"><img src="http://124.223.14.236:8060/${item.img}" alt=""><p>${item.des}</p></a>
          </li>
         
            `
        })
        $('.widget.widget_comments ul').html(newAllLink.join(''))
    })
}
getAllLink1()